package com.tduck.cloud.form.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tduck.cloud.form.entity.FormUserRelationEntity;
import com.tduck.cloud.form.mapper.FormUserRelationMapper;
import com.tduck.cloud.form.service.FormUserRelationService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 表单用户关系服务impl
 *
 * @author Guard Baby
 * @date 2023/09/09
 */
@Service
@RequiredArgsConstructor
public class FormUserRelationServiceImpl extends ServiceImpl<FormUserRelationMapper, FormUserRelationEntity> implements FormUserRelationService {
    @Override
    public List<FormUserRelationEntity> queryByFormKey(String formKey) {
        QueryWrapper<FormUserRelationEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("form_key",formKey);
        return this.baseMapper.selectList(queryWrapper);
    }
}
